/**
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import {AxiosPromise} from 'axios';
import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library';

import {BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from '../../shared/src';

// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace

export namespace resourceviews_v1beta2 {
  export interface Options extends GlobalOptions {
    version: 'v1beta2';
  }

  /**
   * Google Compute Engine Instance Groups API
   *
   * The Resource View API allows users to create and manage logical sets of
   * Google Compute Engine instances.
   *
   * @example
   * const {google} = require('googleapis');
   * const resourceviews = google.resourceviews('v1beta2');
   *
   * @namespace resourceviews
   * @type {Function}
   * @version v1beta2
   * @variation v1beta2
   * @param {object=} options Options for Resourceviews
   */
  export class Resourceviews {
    _options: GlobalOptions;
    google?: GoogleConfigurable;
    root = this;

    zoneOperations: Resource$Zoneoperations;
    zoneViews: Resource$Zoneviews;

    constructor(options: GlobalOptions, google?: GoogleConfigurable) {
      this._options = options || {};
      this.google = google;
      this.getRoot.bind(this);

      this.zoneOperations = new Resource$Zoneoperations(this);
      this.zoneViews = new Resource$Zoneviews(this);
    }

    getRoot() {
      return this.root;
    }
  }

  /**
   * The Label to be applied to the resource views.
   */
  export interface Schema$Label {
    /**
     * Key of the label.
     */
    key?: string;
    /**
     * Value of the label.
     */
    value?: string;
  }
  /**
   * The list response item that contains the resource and end points
   * information.
   */
  export interface Schema$ListResourceResponseItem {
    /**
     * The list of service end points on the resource.
     */
    endpoints?: any;
    /**
     * The full URL of the resource.
     */
    resource?: string;
  }
  /**
   * An operation resource, used to manage asynchronous API requests.
   */
  export interface Schema$Operation {
    /**
     * [Output only] An optional identifier specified by the client when the
     * mutation was initiated. Must be unique for all operation resources in the
     * project.
     */
    clientOperationId?: string;
    /**
     * [Output Only] The time that this operation was requested, in RFC3339 text
     * format.
     */
    creationTimestamp?: string;
    /**
     * [Output Only] The time that this operation was completed, in RFC3339 text
     * format.
     */
    endTime?: string;
    /**
     * [Output Only] If errors occurred during processing of this operation,
     * this field will be populated.
     */
    error?: any;
    /**
     * [Output only] If operation fails, the HTTP error message returned.
     */
    httpErrorMessage?: string;
    /**
     * [Output only] If operation fails, the HTTP error status code returned.
     */
    httpErrorStatusCode?: number;
    /**
     * [Output Only] Unique identifier for the resource, generated by the
     * server.
     */
    id?: string;
    /**
     * [Output Only] The time that this operation was requested, in RFC3339 text
     * format.
     */
    insertTime?: string;
    /**
     * [Output only] Type of the resource.
     */
    kind?: string;
    /**
     * [Output Only] Name of the resource.
     */
    name?: string;
    /**
     * [Output only] Type of the operation. Operations include insert, update,
     * and delete.
     */
    operationType?: string;
    /**
     * [Output only] An optional progress indicator that ranges from 0 to 100.
     * There is no requirement that this be linear or support any granularity of
     * operations. This should not be used to guess at when the operation will
     * be complete. This number should be monotonically increasing as the
     * operation progresses.
     */
    progress?: number;
    /**
     * [Output Only] URL of the region where the operation resides. Only
     * available when performing regional operations.
     */
    region?: string;
    /**
     * [Output Only] Server-defined fully-qualified URL for this resource.
     */
    selfLink?: string;
    /**
     * [Output Only] The time that this operation was started by the server, in
     * RFC3339 text format.
     */
    startTime?: string;
    /**
     * [Output Only] Status of the operation.
     */
    status?: string;
    /**
     * [Output Only] An optional textual description of the current status of
     * the operation.
     */
    statusMessage?: string;
    /**
     * [Output Only] Unique target ID which identifies a particular incarnation
     * of the target.
     */
    targetId?: string;
    /**
     * [Output only] URL of the resource the operation is mutating.
     */
    targetLink?: string;
    /**
     * [Output Only] User who requested the operation, for example:
     * user@example.com.
     */
    user?: string;
    /**
     * [Output Only] If there are issues with this operation, a warning is
     * returned.
     */
    warnings?: any[];
    /**
     * [Output Only] URL of the zone where the operation resides. Only available
     * when performing per-zone operations.
     */
    zone?: string;
  }
  export interface Schema$OperationList {
    /**
     * Unique identifier for the resource; defined by the server (output only).
     */
    id?: string;
    /**
     * The operation resources.
     */
    items?: Schema$Operation[];
    /**
     * Type of resource.
     */
    kind?: string;
    /**
     * A token used to continue a truncated list request (output only).
     */
    nextPageToken?: string;
    /**
     * Server defined URL for this resource (output only).
     */
    selfLink?: string;
  }
  /**
   * The resource view object.
   */
  export interface Schema$ResourceView {
    /**
     * The creation time of the resource view.
     */
    creationTimestamp?: string;
    /**
     * The detailed description of the resource view.
     */
    description?: string;
    /**
     * Services endpoint information.
     */
    endpoints?: Schema$ServiceEndpoint[];
    /**
     * The fingerprint of the service endpoint information.
     */
    fingerprint?: string;
    /**
     * [Output Only] The ID of the resource view.
     */
    id?: string;
    /**
     * Type of the resource.
     */
    kind?: string;
    /**
     * The labels for events.
     */
    labels?: Schema$Label[];
    /**
     * The name of the resource view.
     */
    name?: string;
    /**
     * The URL of a Compute Engine network to which the resources in the view
     * belong.
     */
    network?: string;
    /**
     * A list of all resources in the resource view.
     */
    resources?: string[];
    /**
     * [Output Only] A self-link to the resource view.
     */
    selfLink?: string;
    /**
     * The total number of resources in the resource view.
     */
    size?: number;
  }
  /**
   * The service endpoint that may be started in a VM.
   */
  export interface Schema$ServiceEndpoint {
    /**
     * The name of the service endpoint.
     */
    name?: string;
    /**
     * The port of the service endpoint.
     */
    port?: number;
  }
  /**
   * The request to add resources to the resource view.
   */
  export interface Schema$ZoneViewsAddResourcesRequest {
    /**
     * The list of resources to be added.
     */
    resources?: string[];
  }
  export interface Schema$ZoneViewsGetServiceResponse {
    /**
     * The service information.
     */
    endpoints?: Schema$ServiceEndpoint[];
    /**
     * The fingerprint of the service information.
     */
    fingerprint?: string;
  }
  /**
   * The response to a list request.
   */
  export interface Schema$ZoneViewsList {
    /**
     * The result that contains all resource views that meet the criteria.
     */
    items?: Schema$ResourceView[];
    /**
     * Type of resource.
     */
    kind?: string;
    /**
     * A token used for pagination.
     */
    nextPageToken?: string;
    /**
     * Server defined URL for this resource (output only).
     */
    selfLink?: string;
  }
  /**
   * The response to a list resource request.
   */
  export interface Schema$ZoneViewsListResourcesResponse {
    /**
     * The formatted JSON that is requested by the user.
     */
    items?: Schema$ListResourceResponseItem[];
    /**
     * The URL of a Compute Engine network to which the resources in the view
     * belong.
     */
    network?: string;
    /**
     * A token used for pagination.
     */
    nextPageToken?: string;
  }
  /**
   * The request to remove resources from the resource view.
   */
  export interface Schema$ZoneViewsRemoveResourcesRequest {
    /**
     * The list of resources to be removed.
     */
    resources?: string[];
  }
  export interface Schema$ZoneViewsSetServiceRequest {
    /**
     * The service information to be updated.
     */
    endpoints?: Schema$ServiceEndpoint[];
    /**
     * Fingerprint of the service information; a hash of the contents. This
     * field is used for optimistic locking when updating the service entries.
     */
    fingerprint?: string;
    /**
     * The name of the resource if user wants to update the service information
     * of the resource.
     */
    resourceName?: string;
  }


  export class Resource$Zoneoperations {
    root: Resourceviews;
    constructor(root: Resourceviews) {
      this.root = root;
      this.getRoot.bind(this);
    }

    getRoot() {
      return this.root;
    }


    /**
     * resourceviews.zoneOperations.get
     * @desc Retrieves the specified zone-specific operation resource.
     * @alias resourceviews.zoneOperations.get
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string} params.operation Name of the operation resource to return.
     * @param {string} params.project Name of the project scoping this request.
     * @param {string} params.zone Name of the zone scoping this request.
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    get(params?: Params$Resource$Zoneoperations$Get,
        options?: MethodOptions): AxiosPromise<Schema$Operation>;
    get(params: Params$Resource$Zoneoperations$Get,
        options: MethodOptions|BodyResponseCallback<Schema$Operation>,
        callback: BodyResponseCallback<Schema$Operation>): void;
    get(params: Params$Resource$Zoneoperations$Get,
        callback: BodyResponseCallback<Schema$Operation>): void;
    get(callback: BodyResponseCallback<Schema$Operation>): void;
    get(paramsOrCallback?: Params$Resource$Zoneoperations$Get|
        BodyResponseCallback<Schema$Operation>,
        optionsOrCallback?: MethodOptions|
        BodyResponseCallback<Schema$Operation>,
        callback?: BodyResponseCallback<Schema$Operation>):
        void|AxiosPromise<Schema$Operation> {
      let params =
          (paramsOrCallback || {}) as Params$Resource$Zoneoperations$Get;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Zoneoperations$Get;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/resourceviews/v1beta2/projects/{project}/zones/{zone}/operations/{operation}')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'GET'
            },
            options),
        params,
        requiredParams: ['project', 'zone', 'operation'],
        pathParams: ['operation', 'project', 'zone'],
        context: this.getRoot()
      };
      if (callback) {
        createAPIRequest<Schema$Operation>(parameters, callback);
      } else {
        return createAPIRequest<Schema$Operation>(parameters);
      }
    }


    /**
     * resourceviews.zoneOperations.list
     * @desc Retrieves the list of operation resources contained within the
     * specified zone.
     * @alias resourceviews.zoneOperations.list
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string=} params.filter Optional. Filter expression for filtering listed resources.
     * @param {integer=} params.maxResults Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.
     * @param {string=} params.pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
     * @param {string} params.project Name of the project scoping this request.
     * @param {string} params.zone Name of the zone scoping this request.
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    list(params?: Params$Resource$Zoneoperations$List, options?: MethodOptions):
        AxiosPromise<Schema$OperationList>;
    list(
        params: Params$Resource$Zoneoperations$List,
        options: MethodOptions|BodyResponseCallback<Schema$OperationList>,
        callback: BodyResponseCallback<Schema$OperationList>): void;
    list(
        params: Params$Resource$Zoneoperations$List,
        callback: BodyResponseCallback<Schema$OperationList>): void;
    list(callback: BodyResponseCallback<Schema$OperationList>): void;
    list(
        paramsOrCallback?: Params$Resource$Zoneoperations$List|
        BodyResponseCallback<Schema$OperationList>,
        optionsOrCallback?: MethodOptions|
        BodyResponseCallback<Schema$OperationList>,
        callback?: BodyResponseCallback<Schema$OperationList>):
        void|AxiosPromise<Schema$OperationList> {
      let params =
          (paramsOrCallback || {}) as Params$Resource$Zoneoperations$List;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Zoneoperations$List;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/resourceviews/v1beta2/projects/{project}/zones/{zone}/operations')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'GET'
            },
            options),
        params,
        requiredParams: ['project', 'zone'],
        pathParams: ['project', 'zone'],
        context: this.getRoot()
      };
      if (callback) {
        createAPIRequest<Schema$OperationList>(parameters, callback);
      } else {
        return createAPIRequest<Schema$OperationList>(parameters);
      }
    }
  }

  export interface Params$Resource$Zoneoperations$Get {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Name of the operation resource to return.
     */
    operation?: string;
    /**
     * Name of the project scoping this request.
     */
    project?: string;
    /**
     * Name of the zone scoping this request.
     */
    zone?: string;
  }
  export interface Params$Resource$Zoneoperations$List {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Optional. Filter expression for filtering listed resources.
     */
    filter?: string;
    /**
     * Optional. Maximum count of results to be returned. Maximum value is 500
     * and default value is 500.
     */
    maxResults?: number;
    /**
     * Optional. Tag returned by a previous list request truncated by
     * maxResults. Used to continue a previous list request.
     */
    pageToken?: string;
    /**
     * Name of the project scoping this request.
     */
    project?: string;
    /**
     * Name of the zone scoping this request.
     */
    zone?: string;
  }


  export class Resource$Zoneviews {
    root: Resourceviews;
    constructor(root: Resourceviews) {
      this.root = root;
      this.getRoot.bind(this);
    }

    getRoot() {
      return this.root;
    }


    /**
     * resourceviews.zoneViews.addResources
     * @desc Add resources to the view.
     * @alias resourceviews.zoneViews.addResources
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string} params.project The project name of the resource view.
     * @param {string} params.resourceView The name of the resource view.
     * @param {string} params.zone The zone name of the resource view.
     * @param {().ZoneViewsAddResourcesRequest} params.resource Request body data
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    addResources(
        params?: Params$Resource$Zoneviews$Addresources,
        options?: MethodOptions): AxiosPromise<Schema$Operation>;
    addResources(
        params: Params$Resource$Zoneviews$Addresources,
        options: MethodOptions|BodyResponseCallback<Schema$Operation>,
        callback: BodyResponseCallback<Schema$Operation>): void;
    addResources(
        params: Params$Resource$Zoneviews$Addresources,
        callback: BodyResponseCallback<Schema$Operation>): void;
    addResources(callback: BodyResponseCallback<Schema$Operation>): void;
    addResources(
        paramsOrCallback?: Params$Resource$Zoneviews$Addresources|
        BodyResponseCallback<Schema$Operation>,
        optionsOrCallback?: MethodOptions|
        BodyResponseCallback<Schema$Operation>,
        callback?: BodyResponseCallback<Schema$Operation>):
        void|AxiosPromise<Schema$Operation> {
      let params =
          (paramsOrCallback || {}) as Params$Resource$Zoneviews$Addresources;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Zoneviews$Addresources;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/resourceviews/v1beta2/projects/{project}/zones/{zone}/resourceViews/{resourceView}/addResources')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'POST'
            },
            options),
        params,
        requiredParams: ['project', 'zone', 'resourceView'],
        pathParams: ['project', 'resourceView', 'zone'],
        context: this.getRoot()
      };
      if (callback) {
        createAPIRequest<Schema$Operation>(parameters, callback);
      } else {
        return createAPIRequest<Schema$Operation>(parameters);
      }
    }


    /**
     * resourceviews.zoneViews.delete
     * @desc Delete a resource view.
     * @alias resourceviews.zoneViews.delete
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string} params.project The project name of the resource view.
     * @param {string} params.resourceView The name of the resource view.
     * @param {string} params.zone The zone name of the resource view.
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    delete(params?: Params$Resource$Zoneviews$Delete, options?: MethodOptions):
        AxiosPromise<Schema$Operation>;
    delete(
        params: Params$Resource$Zoneviews$Delete,
        options: MethodOptions|BodyResponseCallback<Schema$Operation>,
        callback: BodyResponseCallback<Schema$Operation>): void;
    delete(
        params: Params$Resource$Zoneviews$Delete,
        callback: BodyResponseCallback<Schema$Operation>): void;
    delete(callback: BodyResponseCallback<Schema$Operation>): void;
    delete(
        paramsOrCallback?: Params$Resource$Zoneviews$Delete|
        BodyResponseCallback<Schema$Operation>,
        optionsOrCallback?: MethodOptions|
        BodyResponseCallback<Schema$Operation>,
        callback?: BodyResponseCallback<Schema$Operation>):
        void|AxiosPromise<Schema$Operation> {
      let params = (paramsOrCallback || {}) as Params$Resource$Zoneviews$Delete;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Zoneviews$Delete;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/resourceviews/v1beta2/projects/{project}/zones/{zone}/resourceViews/{resourceView}')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'DELETE'
            },
            options),
        params,
        requiredParams: ['project', 'zone', 'resourceView'],
        pathParams: ['project', 'resourceView', 'zone'],
        context: this.getRoot()
      };
      if (callback) {
        createAPIRequest<Schema$Operation>(parameters, callback);
      } else {
        return createAPIRequest<Schema$Operation>(parameters);
      }
    }


    /**
     * resourceviews.zoneViews.get
     * @desc Get the information of a zonal resource view.
     * @alias resourceviews.zoneViews.get
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string} params.project The project name of the resource view.
     * @param {string} params.resourceView The name of the resource view.
     * @param {string} params.zone The zone name of the resource view.
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    get(params?: Params$Resource$Zoneviews$Get,
        options?: MethodOptions): AxiosPromise<Schema$ResourceView>;
    get(params: Params$Resource$Zoneviews$Get,
        options: MethodOptions|BodyResponseCallback<Schema$ResourceView>,
        callback: BodyResponseCallback<Schema$ResourceView>): void;
    get(params: Params$Resource$Zoneviews$Get,
        callback: BodyResponseCallback<Schema$ResourceView>): void;
    get(callback: BodyResponseCallback<Schema$ResourceView>): void;
    get(paramsOrCallback?: Params$Resource$Zoneviews$Get|
        BodyResponseCallback<Schema$ResourceView>,
        optionsOrCallback?: MethodOptions|
        BodyResponseCallback<Schema$ResourceView>,
        callback?: BodyResponseCallback<Schema$ResourceView>):
        void|AxiosPromise<Schema$ResourceView> {
      let params = (paramsOrCallback || {}) as Params$Resource$Zoneviews$Get;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Zoneviews$Get;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/resourceviews/v1beta2/projects/{project}/zones/{zone}/resourceViews/{resourceView}')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'GET'
            },
            options),
        params,
        requiredParams: ['project', 'zone', 'resourceView'],
        pathParams: ['project', 'resourceView', 'zone'],
        context: this.getRoot()
      };
      if (callback) {
        createAPIRequest<Schema$ResourceView>(parameters, callback);
      } else {
        return createAPIRequest<Schema$ResourceView>(parameters);
      }
    }


    /**
     * resourceviews.zoneViews.getService
     * @desc Get the service information of a resource view or a resource.
     * @alias resourceviews.zoneViews.getService
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string} params.project The project name of the resource view.
     * @param {string=} params.resourceName The name of the resource if user wants to get the service information of the resource.
     * @param {string} params.resourceView The name of the resource view.
     * @param {string} params.zone The zone name of the resource view.
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    getService(
        params?: Params$Resource$Zoneviews$Getservice, options?: MethodOptions):
        AxiosPromise<Schema$ZoneViewsGetServiceResponse>;
    getService(
        params: Params$Resource$Zoneviews$Getservice,
        options: MethodOptions|
        BodyResponseCallback<Schema$ZoneViewsGetServiceResponse>,
        callback: BodyResponseCallback<Schema$ZoneViewsGetServiceResponse>):
        void;
    getService(
        params: Params$Resource$Zoneviews$Getservice,
        callback: BodyResponseCallback<Schema$ZoneViewsGetServiceResponse>):
        void;
    getService(callback:
                   BodyResponseCallback<Schema$ZoneViewsGetServiceResponse>):
        void;
    getService(
        paramsOrCallback?: Params$Resource$Zoneviews$Getservice|
        BodyResponseCallback<Schema$ZoneViewsGetServiceResponse>,
        optionsOrCallback?: MethodOptions|
        BodyResponseCallback<Schema$ZoneViewsGetServiceResponse>,
        callback?: BodyResponseCallback<Schema$ZoneViewsGetServiceResponse>):
        void|AxiosPromise<Schema$ZoneViewsGetServiceResponse> {
      let params =
          (paramsOrCallback || {}) as Params$Resource$Zoneviews$Getservice;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Zoneviews$Getservice;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/resourceviews/v1beta2/projects/{project}/zones/{zone}/resourceViews/{resourceView}/getService')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'POST'
            },
            options),
        params,
        requiredParams: ['project', 'zone', 'resourceView'],
        pathParams: ['project', 'resourceView', 'zone'],
        context: this.getRoot()
      };
      if (callback) {
        createAPIRequest<Schema$ZoneViewsGetServiceResponse>(
            parameters, callback);
      } else {
        return createAPIRequest<Schema$ZoneViewsGetServiceResponse>(parameters);
      }
    }


    /**
     * resourceviews.zoneViews.insert
     * @desc Create a resource view.
     * @alias resourceviews.zoneViews.insert
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string} params.project The project name of the resource view.
     * @param {string} params.zone The zone name of the resource view.
     * @param {().ResourceView} params.resource Request body data
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    insert(params?: Params$Resource$Zoneviews$Insert, options?: MethodOptions):
        AxiosPromise<Schema$Operation>;
    insert(
        params: Params$Resource$Zoneviews$Insert,
        options: MethodOptions|BodyResponseCallback<Schema$Operation>,
        callback: BodyResponseCallback<Schema$Operation>): void;
    insert(
        params: Params$Resource$Zoneviews$Insert,
        callback: BodyResponseCallback<Schema$Operation>): void;
    insert(callback: BodyResponseCallback<Schema$Operation>): void;
    insert(
        paramsOrCallback?: Params$Resource$Zoneviews$Insert|
        BodyResponseCallback<Schema$Operation>,
        optionsOrCallback?: MethodOptions|
        BodyResponseCallback<Schema$Operation>,
        callback?: BodyResponseCallback<Schema$Operation>):
        void|AxiosPromise<Schema$Operation> {
      let params = (paramsOrCallback || {}) as Params$Resource$Zoneviews$Insert;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Zoneviews$Insert;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/resourceviews/v1beta2/projects/{project}/zones/{zone}/resourceViews')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'POST'
            },
            options),
        params,
        requiredParams: ['project', 'zone'],
        pathParams: ['project', 'zone'],
        context: this.getRoot()
      };
      if (callback) {
        createAPIRequest<Schema$Operation>(parameters, callback);
      } else {
        return createAPIRequest<Schema$Operation>(parameters);
      }
    }


    /**
     * resourceviews.zoneViews.list
     * @desc List resource views.
     * @alias resourceviews.zoneViews.list
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {integer=} params.maxResults Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)
     * @param {string=} params.pageToken Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.
     * @param {string} params.project The project name of the resource view.
     * @param {string} params.zone The zone name of the resource view.
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    list(params?: Params$Resource$Zoneviews$List, options?: MethodOptions):
        AxiosPromise<Schema$ZoneViewsList>;
    list(
        params: Params$Resource$Zoneviews$List,
        options: MethodOptions|BodyResponseCallback<Schema$ZoneViewsList>,
        callback: BodyResponseCallback<Schema$ZoneViewsList>): void;
    list(
        params: Params$Resource$Zoneviews$List,
        callback: BodyResponseCallback<Schema$ZoneViewsList>): void;
    list(callback: BodyResponseCallback<Schema$ZoneViewsList>): void;
    list(
        paramsOrCallback?: Params$Resource$Zoneviews$List|
        BodyResponseCallback<Schema$ZoneViewsList>,
        optionsOrCallback?: MethodOptions|
        BodyResponseCallback<Schema$ZoneViewsList>,
        callback?: BodyResponseCallback<Schema$ZoneViewsList>):
        void|AxiosPromise<Schema$ZoneViewsList> {
      let params = (paramsOrCallback || {}) as Params$Resource$Zoneviews$List;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Zoneviews$List;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/resourceviews/v1beta2/projects/{project}/zones/{zone}/resourceViews')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'GET'
            },
            options),
        params,
        requiredParams: ['project', 'zone'],
        pathParams: ['project', 'zone'],
        context: this.getRoot()
      };
      if (callback) {
        createAPIRequest<Schema$ZoneViewsList>(parameters, callback);
      } else {
        return createAPIRequest<Schema$ZoneViewsList>(parameters);
      }
    }


    /**
     * resourceviews.zoneViews.listResources
     * @desc List the resources of the resource view.
     * @alias resourceviews.zoneViews.listResources
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string=} params.format The requested format of the return value. It can be URL or URL_PORT. A JSON object will be included in the response based on the format. The default format is NONE, which results in no JSON in the response.
     * @param {string=} params.listState The state of the instance to list. By default, it lists all instances.
     * @param {integer=} params.maxResults Maximum count of results to be returned. Acceptable values are 0 to 5000, inclusive. (Default: 5000)
     * @param {string=} params.pageToken Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.
     * @param {string} params.project The project name of the resource view.
     * @param {string} params.resourceView The name of the resource view.
     * @param {string=} params.serviceName The service name to return in the response. It is optional and if it is not set, all the service end points will be returned.
     * @param {string} params.zone The zone name of the resource view.
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    listResources(
        params?: Params$Resource$Zoneviews$Listresources,
        options?: MethodOptions):
        AxiosPromise<Schema$ZoneViewsListResourcesResponse>;
    listResources(
        params: Params$Resource$Zoneviews$Listresources,
        options: MethodOptions|
        BodyResponseCallback<Schema$ZoneViewsListResourcesResponse>,
        callback: BodyResponseCallback<Schema$ZoneViewsListResourcesResponse>):
        void;
    listResources(
        params: Params$Resource$Zoneviews$Listresources,
        callback: BodyResponseCallback<Schema$ZoneViewsListResourcesResponse>):
        void;
    listResources(
        callback: BodyResponseCallback<Schema$ZoneViewsListResourcesResponse>):
        void;
    listResources(
        paramsOrCallback?: Params$Resource$Zoneviews$Listresources|
        BodyResponseCallback<Schema$ZoneViewsListResourcesResponse>,
        optionsOrCallback?: MethodOptions|
        BodyResponseCallback<Schema$ZoneViewsListResourcesResponse>,
        callback?: BodyResponseCallback<Schema$ZoneViewsListResourcesResponse>):
        void|AxiosPromise<Schema$ZoneViewsListResourcesResponse> {
      let params =
          (paramsOrCallback || {}) as Params$Resource$Zoneviews$Listresources;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Zoneviews$Listresources;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/resourceviews/v1beta2/projects/{project}/zones/{zone}/resourceViews/{resourceView}/resources')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'GET'
            },
            options),
        params,
        requiredParams: ['project', 'zone', 'resourceView'],
        pathParams: ['project', 'resourceView', 'zone'],
        context: this.getRoot()
      };
      if (callback) {
        createAPIRequest<Schema$ZoneViewsListResourcesResponse>(
            parameters, callback);
      } else {
        return createAPIRequest<Schema$ZoneViewsListResourcesResponse>(
            parameters);
      }
    }


    /**
     * resourceviews.zoneViews.removeResources
     * @desc Remove resources from the view.
     * @alias resourceviews.zoneViews.removeResources
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string} params.project The project name of the resource view.
     * @param {string} params.resourceView The name of the resource view.
     * @param {string} params.zone The zone name of the resource view.
     * @param {().ZoneViewsRemoveResourcesRequest} params.resource Request body data
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    removeResources(
        params?: Params$Resource$Zoneviews$Removeresources,
        options?: MethodOptions): AxiosPromise<Schema$Operation>;
    removeResources(
        params: Params$Resource$Zoneviews$Removeresources,
        options: MethodOptions|BodyResponseCallback<Schema$Operation>,
        callback: BodyResponseCallback<Schema$Operation>): void;
    removeResources(
        params: Params$Resource$Zoneviews$Removeresources,
        callback: BodyResponseCallback<Schema$Operation>): void;
    removeResources(callback: BodyResponseCallback<Schema$Operation>): void;
    removeResources(
        paramsOrCallback?: Params$Resource$Zoneviews$Removeresources|
        BodyResponseCallback<Schema$Operation>,
        optionsOrCallback?: MethodOptions|
        BodyResponseCallback<Schema$Operation>,
        callback?: BodyResponseCallback<Schema$Operation>):
        void|AxiosPromise<Schema$Operation> {
      let params =
          (paramsOrCallback || {}) as Params$Resource$Zoneviews$Removeresources;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Zoneviews$Removeresources;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/resourceviews/v1beta2/projects/{project}/zones/{zone}/resourceViews/{resourceView}/removeResources')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'POST'
            },
            options),
        params,
        requiredParams: ['project', 'zone', 'resourceView'],
        pathParams: ['project', 'resourceView', 'zone'],
        context: this.getRoot()
      };
      if (callback) {
        createAPIRequest<Schema$Operation>(parameters, callback);
      } else {
        return createAPIRequest<Schema$Operation>(parameters);
      }
    }


    /**
     * resourceviews.zoneViews.setService
     * @desc Update the service information of a resource view or a resource.
     * @alias resourceviews.zoneViews.setService
     * @memberOf! ()
     *
     * @param {object} params Parameters for request
     * @param {string} params.project The project name of the resource view.
     * @param {string} params.resourceView The name of the resource view.
     * @param {string} params.zone The zone name of the resource view.
     * @param {().ZoneViewsSetServiceRequest} params.resource Request body data
     * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param {callback} callback The callback that handles the response.
     * @return {object} Request object
     */
    setService(
        params?: Params$Resource$Zoneviews$Setservice,
        options?: MethodOptions): AxiosPromise<Schema$Operation>;
    setService(
        params: Params$Resource$Zoneviews$Setservice,
        options: MethodOptions|BodyResponseCallback<Schema$Operation>,
        callback: BodyResponseCallback<Schema$Operation>): void;
    setService(
        params: Params$Resource$Zoneviews$Setservice,
        callback: BodyResponseCallback<Schema$Operation>): void;
    setService(callback: BodyResponseCallback<Schema$Operation>): void;
    setService(
        paramsOrCallback?: Params$Resource$Zoneviews$Setservice|
        BodyResponseCallback<Schema$Operation>,
        optionsOrCallback?: MethodOptions|
        BodyResponseCallback<Schema$Operation>,
        callback?: BodyResponseCallback<Schema$Operation>):
        void|AxiosPromise<Schema$Operation> {
      let params =
          (paramsOrCallback || {}) as Params$Resource$Zoneviews$Setservice;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Zoneviews$Setservice;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
      const parameters = {
        options: Object.assign(
            {
              url:
                  (rootUrl +
                   '/resourceviews/v1beta2/projects/{project}/zones/{zone}/resourceViews/{resourceView}/setService')
                      .replace(/([^:]\/)\/+/g, '$1'),
              method: 'POST'
            },
            options),
        params,
        requiredParams: ['project', 'zone', 'resourceView'],
        pathParams: ['project', 'resourceView', 'zone'],
        context: this.getRoot()
      };
      if (callback) {
        createAPIRequest<Schema$Operation>(parameters, callback);
      } else {
        return createAPIRequest<Schema$Operation>(parameters);
      }
    }
  }

  export interface Params$Resource$Zoneviews$Addresources {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The project name of the resource view.
     */
    project?: string;
    /**
     * The name of the resource view.
     */
    resourceView?: string;
    /**
     * The zone name of the resource view.
     */
    zone?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$ZoneViewsAddResourcesRequest;
  }
  export interface Params$Resource$Zoneviews$Delete {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The project name of the resource view.
     */
    project?: string;
    /**
     * The name of the resource view.
     */
    resourceView?: string;
    /**
     * The zone name of the resource view.
     */
    zone?: string;
  }
  export interface Params$Resource$Zoneviews$Get {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The project name of the resource view.
     */
    project?: string;
    /**
     * The name of the resource view.
     */
    resourceView?: string;
    /**
     * The zone name of the resource view.
     */
    zone?: string;
  }
  export interface Params$Resource$Zoneviews$Getservice {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The project name of the resource view.
     */
    project?: string;
    /**
     * The name of the resource if user wants to get the service information of
     * the resource.
     */
    resourceName?: string;
    /**
     * The name of the resource view.
     */
    resourceView?: string;
    /**
     * The zone name of the resource view.
     */
    zone?: string;
  }
  export interface Params$Resource$Zoneviews$Insert {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The project name of the resource view.
     */
    project?: string;
    /**
     * The zone name of the resource view.
     */
    zone?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$ResourceView;
  }
  export interface Params$Resource$Zoneviews$List {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * Maximum count of results to be returned. Acceptable values are 0 to 5000,
     * inclusive. (Default: 5000)
     */
    maxResults?: number;
    /**
     * Specifies a nextPageToken returned by a previous list request. This token
     * can be used to request the next page of results from a previous list
     * request.
     */
    pageToken?: string;
    /**
     * The project name of the resource view.
     */
    project?: string;
    /**
     * The zone name of the resource view.
     */
    zone?: string;
  }
  export interface Params$Resource$Zoneviews$Listresources {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The requested format of the return value. It can be URL or URL_PORT. A
     * JSON object will be included in the response based on the format. The
     * default format is NONE, which results in no JSON in the response.
     */
    format?: string;
    /**
     * The state of the instance to list. By default, it lists all instances.
     */
    listState?: string;
    /**
     * Maximum count of results to be returned. Acceptable values are 0 to 5000,
     * inclusive. (Default: 5000)
     */
    maxResults?: number;
    /**
     * Specifies a nextPageToken returned by a previous list request. This token
     * can be used to request the next page of results from a previous list
     * request.
     */
    pageToken?: string;
    /**
     * The project name of the resource view.
     */
    project?: string;
    /**
     * The name of the resource view.
     */
    resourceView?: string;
    /**
     * The service name to return in the response. It is optional and if it is
     * not set, all the service end points will be returned.
     */
    serviceName?: string;
    /**
     * The zone name of the resource view.
     */
    zone?: string;
  }
  export interface Params$Resource$Zoneviews$Removeresources {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The project name of the resource view.
     */
    project?: string;
    /**
     * The name of the resource view.
     */
    resourceView?: string;
    /**
     * The zone name of the resource view.
     */
    zone?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$ZoneViewsRemoveResourcesRequest;
  }
  export interface Params$Resource$Zoneviews$Setservice {
    /**
     * Auth client or API Key for the request
     */
    auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;

    /**
     * The project name of the resource view.
     */
    project?: string;
    /**
     * The name of the resource view.
     */
    resourceView?: string;
    /**
     * The zone name of the resource view.
     */
    zone?: string;

    /**
     * Request body metadata
     */
    requestBody?: Schema$ZoneViewsSetServiceRequest;
  }
}
